package com.dq.Week3.day13.map;

import java.util.*;

public class MapDemo {
    public static void main(String[] args) {
        Map<String,String> map = new HashMap<>();

        map.put("hello","你好");
        map.put("world","世界");

        System.out.println(map.get("hello"));

        Set<String> keyset = map.keySet();
        System.out.println(keyset);
        Collection<String> values = map.values();
        System.out.println(values);
        Set<Map.Entry<String, String>> entries = map.entrySet();
        System.out.println(entries);
        for (Map.Entry<String, String> entry : entries) {
            System.out.println(entry.getKey()+":"+entry.getValue());
        }

    }
}
